/**
 * Custom taxonomy fields JS
 *
 * @notes - This should be re-written to be more portable
 */
jQuery(document).ready(function($){

	var field = 'icon';

    $('.editinline').on('click', function(){  
        var tag_id = $(this).parents('tr').attr('id'); 
        var value = $('.'+field, '#'+tag_id).text(); 
        $(':input[name="'+field+'"]', '.inline-edit-row').val(value);
    });

    $('.inline-edit-save .save').on('click', function() {
    	var input = $('input[name="'+field+'"]');
    	var value = input.val();
    	$('#the-list').ajaxComplete( function() {
    		input.val(value);
    	});
    });

});  